﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:ig="http://schemas.infragistics.com/xaml" xmlns:igPrim="http://schemas.infragistics.com/xaml/primitives" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:System="clr-namespace:System;assembly=mscorlib" mc:Ignorable="d">

  <!-- *********************************  COLORS  ********************************* -->
  <ResourceDictionary.MergedDictionaries>
    <ResourceDictionary Source="Theme.Colors.xaml" />
    <ResourceDictionary Source="Styles.WPF.xaml" />
  </ResourceDictionary.MergedDictionaries>

  <!-- *********************************  BRUSHES  ********************************* -->
  <!--  Popup Resizer Brushes -->
  <SolidColorBrush x:Key="PopupResizerBorderBrush" Color="{StaticResource Color_004}" />

  <!-- ******************************************************** SL-WPF SHARED RESOURCES ***********************************************************
      ********************************************************************************************************************************************************************    -->

  <!-- *********************************  Converters  ********************************* -->
  <igPrim:ValueConverterGroup x:Key="boolToVisibility">
    <!-- if true sets visibility to Visible -->
    <igPrim:FixedValueConverter>
      <igPrim:FixedValueConverter.SourceValue>
        <System:Boolean>
          True
        </System:Boolean>
      </igPrim:FixedValueConverter.SourceValue>
      <igPrim:FixedValueConverter.DestinationValue>
        <Visibility>
          Visible
        </Visibility>
      </igPrim:FixedValueConverter.DestinationValue>
    </igPrim:FixedValueConverter>
    <!-- if false sets visibility to Collapsed -->
    <igPrim:FixedValueConverter>
      <igPrim:FixedValueConverter.DestinationValue>
        <Visibility>
          Collapsed
        </Visibility>
      </igPrim:FixedValueConverter.DestinationValue>
    </igPrim:FixedValueConverter>
  </igPrim:ValueConverterGroup>

  <!-- ******************************************* PopupResizer Style   *************************************-->
  <Style x:Key="PopupResizerStyle" TargetType="igPrim:PopupResizer">
    <Setter Property="Background" Value="{StaticResource LightForegroundBrush}" />
    <Setter Property="BorderBrush" Value="{StaticResource PopupResizerBorderBrush}" />
    <Setter Property="Height" Value="20" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="igPrim:PopupResizer">
          <Border Height="{TemplateBinding Height}">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="FlowDirections">
                <VisualState x:Name="LTR" />
                <VisualState x:Name="RTL">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ResizeElem" Storyboard.TargetProperty="Cursor">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Cursor>SizeNESW</Cursor>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="AboveLTR">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Cursor" Storyboard.TargetName="ResizeElem">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Cursor>SizeNESW</Cursor>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="AboveRTL">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Cursor" Storyboard.TargetName="ResizeElem">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Cursor>SizeNWSE</Cursor>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="Position">
                <VisualState x:Name="Below" />
                <VisualState x:Name="Above">
                  <Storyboard>
                    <PointAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransformOrigin)" Storyboard.TargetName="BelowPosition">
                      <EasingPointKeyFrame KeyTime="0" Value="0.5,0.5" />
                    </PointAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="BelowPosition">
                      <EasingDoubleKeyFrame KeyTime="0" Value="-1" />
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid>
              <Grid x:Name="BelowPosition" Margin="0">
                <Grid.RenderTransform>
                  <TransformGroup>
                    <ScaleTransform />
                    <SkewTransform />
                    <RotateTransform />
                    <TranslateTransform />
                  </TransformGroup>
                </Grid.RenderTransform>

                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*" />
                  <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>

                <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" Grid.ColumnSpan="2" Margin="0 -2 0 0" />

                <Border x:Name="ResizeElem" Grid.Column="1" Cursor="SizeNWSE" BorderThickness="1" VerticalAlignment="Bottom" Background="{StaticResource TransparentBrush}">
                  <Grid x:Name="BelowDots" VerticalAlignment="Bottom" Width="7" Height="7" Margin="0,0,2,2">
                    <Rectangle x:Name="TouchableZone" Fill="{StaticResource TransparentBrush}" Grid.Column="1" Margin="-20 -12 -12 -12" />
                    <Rectangle HorizontalAlignment="Right" Height="2" Margin="0,0,4,0" VerticalAlignment="Bottom" Width="2" Fill="{StaticResource LightForegroundBrush}" />
                    <Rectangle HorizontalAlignment="Right" Height="2" VerticalAlignment="Bottom" Width="2" Fill="{StaticResource LightForegroundBrush}" />
                    <Rectangle HorizontalAlignment="Right" Height="2" Margin="0,0,0,4" VerticalAlignment="Bottom" Width="2" Fill="{StaticResource LightForegroundBrush}" />
                    <Rectangle HorizontalAlignment="Right" Height="2" Margin="0,0,5,1" VerticalAlignment="Bottom" Width="2" Fill="{TemplateBinding BorderBrush}" />
                    <Rectangle HorizontalAlignment="Right" Height="2" Margin="0,0,1,1" VerticalAlignment="Bottom" Width="2" Fill="{TemplateBinding BorderBrush}" />
                    <Rectangle HorizontalAlignment="Right" Margin="0,0,1,5" Width="2" Fill="{TemplateBinding BorderBrush}" Height="2" VerticalAlignment="Bottom" />
                  </Grid>
                </Border>
              </Grid>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <!-- *********************************  ComboEditorItemControl Style  ********************************* -->
  <Style x:Key="ComboEditorItemControlStyle" TargetType="ig:ComboEditorItemControl">
    <Setter Property="FontFamily" Value="Segoe UI" />
    <Setter Property="FontSize" Value="13.333" />
    <Setter Property="MinHeight" Value="30" />
    <Setter Property="Padding" Value="5 3" />
    <Setter Property="Background" Value="{StaticResource TransparentBrush}" />
    <Setter Property="BorderBrush" Value="Transparent" />
    <Setter Property="HorizontalContentAlignment" Value="Left" />
    <Setter Property="VerticalContentAlignment" Value="Center" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ig:ComboEditorItemControl">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal" />
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Bd" Storyboard.TargetProperty="Fill">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ComboBoxItemHoverBackgroundBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Bd" Storyboard.TargetProperty="Stroke">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ComboBoxItemHoverBorderBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="DisabledVisualElement">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected" />
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="selectedRectangle" Storyboard.TargetProperty="Opacity">
                      <SplineDoubleKeyFrame KeyTime="0" Value="1" />
                    </DoubleAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Foreground" Storyboard.TargetName="contentControl">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource LightForegroundBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="FocusedVisualElement">
                      <EasingDoubleKeyFrame KeyTime="0" Value="1" />
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unfocused" />
              </VisualStateGroup>
              <VisualStateGroup x:Name="SelectionModeStates">
                <VisualState x:Name="CheckBox">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="SelectedCheckbox">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Standard" />
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Rectangle x:Name="Bd" Fill="{TemplateBinding Background}" StrokeThickness="{TemplateBinding BorderThickness}" Stroke="{TemplateBinding BorderBrush}" />
            <Rectangle x:Name="selectedRectangle" Fill="{StaticResource ComboBoxItemPressedBackgroundBrush}" IsHitTestVisible="False" Opacity="0" Stroke="{StaticResource ComboBoxItemPressedBorderBrush}" />
            <StackPanel x:Name="content" Orientation="Horizontal" Margin="{TemplateBinding Padding}">
              <CheckBox x:Name="SelectedCheckbox" VerticalAlignment="Center" IsHitTestVisible="False" Visibility="Collapsed" Style="{StaticResource CheckBoxStyle}" MinHeight="24" />
              <ContentControl x:Name="contentControl" Foreground="{TemplateBinding Foreground}">
                <ContentPresenter x:Name="contentPresenter" Margin="{TemplateBinding Padding}" VerticalAlignment="Center" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" />
              </ContentControl>
            </StackPanel>
            <Rectangle x:Name="FocusedVisualElement" Stroke="{StaticResource ComboBoxItemPressedBorderBrush}" StrokeThickness="2" Opacity="0" />
            <Rectangle x:Name="DisabledVisualElement" Fill="{StaticResource DisabledVisualElement}" Visibility="Collapsed" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="ig:ComboEditorItemControl" BasedOn="{StaticResource ComboEditorItemControlStyle}" />

  <!-- *********************************  TextBlock Style  ********************************* -->
  <Style x:Key="TextBlockStyle" TargetType="TextBlock">
    <Setter Property="Foreground" Value="{StaticResource ForegroundBrush}" />
    <Setter Property="FontSize" Value="14.667" />
    <Setter Property="FontFamily" Value="Segoe UI" />
    <Setter Property="MinHeight" Value="30" />
  </Style>

  <!-- *********************************  XamComboEditor Style  ********************************* -->
  <Style x:Key="XamComboEditorStyle" TargetType="ig:XamComboEditor">
    <Setter Property="FontSize" Value="14.667" />
    <Setter Property="Padding" Value="4,3" />
    <Setter Property="MinHeight" Value="32" />
    <Setter Property="HorizontalContentAlignment" Value="Left" />
    <Setter Property="VerticalContentAlignment" Value="Center" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="Foreground" Value="{StaticResource ForegroundBrush}" />
    <Setter Property="Background" Value="{StaticResource ComboBoxBackgroundBrush}" />
    <Setter Property="BorderBrush" Value="{StaticResource ComboBoxBorderBrush}" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ig:XamComboEditor">
          <Grid igPrim:XamlHelper.SnapsToDevicePixels="True">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal" />
                <VisualState x:Name="MouseOver" />
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualElement" Storyboard.TargetProperty="(UIElement.Opacity)">
                      <SplineDoubleKeyFrame KeyTime="00:00:00" Value=".55" />
                    </DoubleAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="TextBoxPresenter">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>
                            1,1,0,1
                          </Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="FocusVisualElement">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unfocused" />
              </VisualStateGroup>
              <VisualStateGroup x:Name="ModeStates">
                <VisualState x:Name="Selectable">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="contentControl">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Editable">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TextBoxPresenter" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MultiSelectContentPanel" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="MultiSelectContentPanel">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>10,10,0,0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="TextBoxPresenter">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>
                            5,0,0,0
                          </Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="WaterMarkStates">
                <VisualState x:Name="WaterMarkHidden" />
                <VisualState x:Name="WaterMarkVisible">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="WaterMark" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="DropDownStates">
                <VisualState x:Name="Closed" />
                <VisualState x:Name="Open">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Popup" Storyboard.TargetProperty="IsOpen">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <System:Boolean>True</System:Boolean>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="PositionStates">
                <VisualState x:Name="Below"/>
                <VisualState x:Name="Above">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Resizer" Storyboard.TargetProperty="Position">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <igPrim:ResizerPosition>Above</igPrim:ResizerPosition>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Resizer" Storyboard.TargetProperty="(Grid.Row)">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <System:Int32>0</System:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="ContentPresenterBorder" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
              <Grid x:Name="gridLayout" ShowGridLines="False">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*" />
                  <ColumnDefinition Width="32" />
                </Grid.ColumnDefinitions>
                <Popup x:Name="Popup" Grid.ColumnSpan="2" VerticalAlignment="Bottom" IsOpen="False">
                  <Grid Background="{TemplateBinding BorderBrush}">
                    <Grid.RowDefinitions>
                      <RowDefinition Height="Auto" />
                      <RowDefinition Height="*" />
                      <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <Border x:Name="RootPopupElement" Grid.Row="1" Height="Auto" MinHeight="30" MaxHeight="{TemplateBinding MaxDropDownHeight}" MaxWidth="{TemplateBinding MaxDropDownWidth}" HorizontalAlignment="Stretch" VerticalAlignment="Top" Background="{StaticResource PopupBackgroundBrush}" BorderBrush="{StaticResource PopupBorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                      <Grid>
                        <Grid.ColumnDefinitions>
                          <ColumnDefinition Width="*" />
                          <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                          <RowDefinition Height="*" />
                          <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <igPrim:ItemsPanel x:Name="ItemsPanel" Margin="1,0" VerticalAlignment="Top"/>
                        <ScrollBar x:Name="VerticalScrollBar" Width="20" Grid.Column="1" Grid.Row="0" Style="{StaticResource ScrollBarStyle}" />
                        <ScrollBar x:Name="HorizontalScrollBar" Height="20" Grid.Column="0" Grid.Row="1" Style="{StaticResource ScrollBarStyle}" />
                      </Grid>
                    </Border>
                    <igPrim:PopupResizer x:Name="Resizer" Popup="{Binding ElementName=Popup}"  Visibility="{Binding Path=AllowDropDownResizing, Converter={StaticResource boolToVisibility}, RelativeSource={RelativeSource TemplatedParent}}" Grid.Row="2" Grid.ColumnSpan="2" ResizeElement="{Binding ElementName=RootPopupElement}" Style="{StaticResource PopupResizerStyle}">
                      <igPrim:PopupResizer.RenderTransform>
                        <TransformGroup>
                          <ScaleTransform/>
                          <SkewTransform/>
                          <RotateTransform/>
                          <TranslateTransform/>
                        </TransformGroup>
                      </igPrim:PopupResizer.RenderTransform>
                    </igPrim:PopupResizer>
                  </Grid>
                </Popup>
                <ToggleButton x:Name="ToggleButton" Grid.ColumnSpan="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" HorizontalContentAlignment="Right" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" IsTabStop="False" Style="{StaticResource ComboBoxToggleButtonStyle}" />
                <TextBlock x:Name="WaterMark" Style="{StaticResource TextBlockStyle}" HorizontalAlignment="Stretch" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" IsHitTestVisible="False" Padding="{TemplateBinding Padding}" Margin="3,1,0,1" Foreground="{TemplateBinding Foreground}" Text="{TemplateBinding EmptyText}" Visibility="Collapsed" />
                <igPrim:SpecializedTextBox x:Name="TextBoxPresenter" Background="{StaticResource TransparentBrush}" BorderThickness="0" Style="{StaticResource TextBoxStyle}" Foreground="{StaticResource ForegroundBrush}" IsTabStop="{TemplateBinding IsTabStop}" Visibility="Collapsed" />
                <ContentControl x:Name="contentControl" Foreground="{TemplateBinding Foreground}" HorizontalAlignment="Stretch" VerticalAlignment="Center">
                  <Grid>
                    <StackPanel x:Name="MultiSelectContentPanel" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Orientation="Horizontal" Margin="10,0,0,0" />
                  </Grid>
                </ContentControl>
              </Grid>
            </Border>
            <Border x:Name="FocusVisualElement" BorderBrush="{StaticResource ComboBoxFocusedBorderBrush}" BorderThickness="1" IsHitTestVisible="false" Visibility="Collapsed" />
            <Rectangle x:Name="DisabledVisualElement" Fill="{StaticResource DisabledVisualElement}" IsHitTestVisible="false" Opacity="0" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="ig:XamComboEditor" BasedOn="{StaticResource XamComboEditorStyle}" />
</ResourceDictionary>